/**
 * @(#)IndexController.java, 2017/12/16.
 * <p/>
 * Copyright 2017 Wangzx, Inc. All rights reserved.
 * WANGZX/CONFIDENTIAL. Use is subject to license terms.
 */
package org.wangzx.study.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.wangzx.study.meta.vo.UserVO;
import org.wangzx.study.service.UserService;

@Controller
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private UserService userService;

    @RequestMapping("/getVO.json")
    @ResponseBody
    public UserVO index() {
        return userService.getUserVO();
    }

    @RequestMapping("/evict.json")
    @ResponseBody
    public boolean evict() {
        return userService.evictUserVO();
    }
}
